﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainFrm.Master" AutoEventWireup="true" CodeBehind="PermissionAdmin.aspx.cs" Inherits="DataLib.Accounts.PermissionAdmin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head"  runat="server">

    <style type="text/css">
        td
        {
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="EwtsConext" runat="server">
<div>
	<h1>权 限 管 理</h1>
    <!--一个表单-->
    <div class="one">
    	增加权限类别：
        <asp:TextBox ID="CategoriesName" runat="server" Width="156"></asp:TextBox>&nbsp;<asp:Button
        ID="BtnAddCategory" runat="server" Text="增加新的权限类别" onclick="BtnAddCategory_Click">
        </asp:Button>
        <asp:Label ID="lbltip1" runat="server" ForeColor="Red"></asp:Label>
    </div>
    <div class="one">
    	选择权限类别：
        <asp:DropDownList ID="ClassList" runat="server" Width="156px" AutoPostBack="True"
        OnSelectedIndexChanged="ClassList_SelectedIndexChanged">
        </asp:DropDownList>&nbsp;
        <asp:ImageButton ID="BtnDelCategory" runat="server" ImageUrl="../images/icons/button_del.gif"
        ToolTip="删除该类别" onclick="BtnDelCategory_Click"></asp:ImageButton>
    </div>
    <div class="one">
    	增加新权限：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="PermissionsName" runat="server" Width="156"></asp:TextBox>&nbsp;
        <asp:Button ID="BtnAddPermissions" runat="server" Text="在该类别中增加新权限" 
        onclick="BtnAddPermissions_Click"></asp:Button>
        <asp:Label ID="lbltip2" runat="server" ForeColor="Red"></asp:Label>
    </div>
    <p></p>
    <p></p>

    <div class="one">
        <table cellspacing="0" cellpadding="5" width="100%" align="center" border="0">
            <tr>
                <td valign="middle" align="center" height="30">
                    <strong>该类别的权限列表</strong>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DataGrid ID="DataGrid1" runat="server" Width="100%" DataKeyField="PermissionID"
                    CellPadding="0" AutoGenerateColumns="False" onitemdatabound="DataGrid1_ItemDataBound" 
                    oncancelcommand="DataGrid1_CancelCommand" oneditcommand="DataGrid1_EditCommand" 
                    onitemcommand="DataGrid1_ItemCommand" 
                    onupdatecommand="DataGrid1_UpdateCommand" >
                        <FooterStyle Wrap="False"></FooterStyle>
                        <SelectedItemStyle Wrap="False"></SelectedItemStyle>
                        <EditItemStyle Wrap="False"></EditItemStyle>
                        <AlternatingItemStyle Wrap="False"></AlternatingItemStyle>
                        <ItemStyle Wrap="False"></ItemStyle>
                        <Columns>
                            <asp:BoundColumn DataField="PermissionID" HeaderText="权限编码" ReadOnly="True">
                                <HeaderStyle Width="55px"></HeaderStyle>
                                <ItemStyle Wrap="False"></ItemStyle>
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="Description" HeaderText="权限名称">                                              </asp:BoundColumn>
                            <asp:EditCommandColumn UpdateText="更新" HeaderText="编辑" CancelText="取消"                                 EditText="编辑">
                                <HeaderStyle Width="65px"></HeaderStyle>
							    <ItemStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center">
                                </ItemStyle>
						    </asp:EditCommandColumn>
                            <asp:TemplateColumn  HeaderText="删除">
                                <HeaderStyle Width="50px"></HeaderStyle>
                                <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnDelete" runat="server" 
                                    ImageUrl="..\images\icons\button_del.gif" CommandName="Delete">
                                    </asp:ImageButton>
                                </ItemTemplate>
                            </asp:TemplateColumn>                                            
                        </Columns>
                        <PagerStyle Wrap="False"></PagerStyle>
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:DataGrid></td>
                </tr>                            
            </table>
        </div>
    </div>
</asp:Content>
